﻿<div class="row">
    <div class="card">
        <div class="listview lv-bordered lv-lg">
            <div class="lv-header-alt clearfix">
                <h2 class="lvh-label hidden-xs" style="font-size: 20px">发件箱</h2>
                <ul class="lv-actions actions">
                    <li>
                        <a ng-click="load();"><i class="zmdi zmdi-refresh-alt"></i></a>
                    </li>
                    <li>
                        <a ng-click="newmail();"><i class="zmdi zmdi-plus"></i></a>
                    </li>
                </ul>
            </div>

            <div class="lv-body">
                <div class="lv-item media" ng-repeat="m in Mails">
                    <div class="media-body">
                        <h2 class="lv-title">{{m.title}}</h2>
                        <small class="lv-small" ng-bind-html="m.content|htmlString"></small>
                        <ul class="lv-attrs">
                            <li>收件人：{{m.tos}}</li>
                            <li>发送日期：{{m.time|date:'yyyy-MM-dd HH:mm:ss'}}</li>
                            <li>
                                <a ng-click="addToBlackList(m.clientip)">请求IP：{{m.clientip}}</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="modal" class="modal">
    <div class="container-fluid" style="margin: 15px 0;">
        <form class="bgm-white">
            <div class="input-group">
                <span class="input-group-addon">
                    收件人：
                </span>
                <div class="fg-line">
                    <input type="text" class="form-control" id="tos" ng-model="mail.tos" />
                </div>
            </div>
            <div class="input-group">
                <span class="input-group-addon">
                    标题：
                </span>
                <div class="fg-line">
                    <input type="text" class="form-control" id="title" ng-model="mail.title" />
                </div>
            </div>
            <div class="input-group">
                <span class="input-group-addon">
                    内容：
                </span>
                <div style="height: 300px;" class="ueditor" ng-model="mail.content" type="text/plain"></div>
            </div>
            <div class="btn-group">
                <button type="button" class="btn btn-info waves-effect" ng-click="send(mail)">发送</button>
                <button type="button" class="btn btn-danger waves-effect" onclick="layer.closeAll()">取消</button>
            </div>
        </form>
    </div>
</div>